AREA will calculate the integral of a function defined by the user supplied function F. AREA uses various Newton-Cotes formulas to calculate the integral by quadrature. The particular formula used is determined by the number of integration points. If the number of points minus one is divisible by six a formula will be used with an error on the order of dx9. If this does not hold, then the integral will be divided into two sections. One section will contain 6N+1 points and the other will contain the rest of the function. If one point remains the trapezoid rule will be used. If two points remain Simpson's one third rule is applied. Simpson's three-eighths rule is next. It is desirable for speed and accuracy to use a number of points such that the auxiliary functions need not be used. If possible, use (6N +1) points.
TYPE REQUIREMENTS
TYPE
FLOAT = REAL or DOUBLE or EXTENDED;
FIXXED = INTEGER or LONGINT;
CALLING PROCEDURE
var
XSTART:FLOAT;{Starting point for the integration}
XFINISH:FLOAT;{Ending point for the integration}
POINTS:FIXXED;{Number of integration points}
Define the function F of type FLOAT with input XIN also of type FLOAT.